import { v4 as uuidv4 } from "uuid";
export const getUUIDToken = () => {
  let UUIDToken = localStorage.getItem("UUID_TOKEN");
  if (!UUIDToken) {
    UUIDToken = uuidv4();
    localStorage.setItem("UUID_TOKEN", UUIDToken);
  }
  return UUIDToken;
};

export const setUserTokenToLocal=(userToken) =>{  
  // localStorage.setItem("UserInfoLocal",JSON.stringify(userInfo))
  localStorage.setItem("userToken",userToken);
};

export const getUserTokenByLocal=()=>{
  // let userJson= localStorage.getItem("UserInfoLocal");
  // return JSON.parse(userJson);
    return localStorage.getItem("userToken")
};

export const clearUserToken=()=>{
    localStorage.removeItem("userToken");
}
